[NET] back: Initialise first fragment properly
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 17 Aug 2006 10:32:39 +0000 (11:32 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 17 Aug 2006 10:32:39 +0000 (11:32 +0100)
commitfb837a6f8e5b39cfa008aaf4fc437c0387ef306e
treee2564f72daf9ea00701dc5c35a0039849af71fb8
parent25dd6e678d52e1bb70375ccb83e442414b3484c0
[NET] back: Initialise first fragment properly

The first fragment is used to store the pending_idx of the leading
txreq if it doesn't fit in the head area.  When it does fit into
the head we need to ensure that the first fragment contains a value
that is not equal to pending_idx as that's what we use to distinguish
between the two cases in a a number of places.

This patch sets the first fragment to ~0 which is not equal to any
valid pending_idx.  Without this initialisation, we may double-free
a pending_idx if the first fragment happened to contain a value
equal to it (this usually happened with pending_idx 0).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
linux-2.6-xen-sparse/drivers/xen/netback/netback.c